package main

import (
	"log"
	"os"

	"workflow-gui/internal/encoding"
	"workflow-gui/internal/mcp"
)

func main() {
	// Initialize UTF-8 encoding for Windows console
	encoding.InitUTF8()

	// Set up logging to stderr (stdout is used for JSON-RPC)
	log.SetOutput(os.Stderr)
	log.SetFlags(log.LstdFlags | log.Lshortfile)

	// Create and start server
	server := mcp.NewServer()
	if err := server.Start(); err != nil {
		log.Fatalf("Server error: %v", err)
	}
}
